<script lang='ts'>
import { defineComponent, inject } from 'vue'
import * as turf from '@turf/turf'
import { Viewer, GeoJsonDataSource } from 'cesium'
export default defineComponent({
  components: {
  },
  setup () {
    const viewer = inject<Viewer>('Viewer')
    if (!viewer) return
    const point = turf.point([120, 30])
    const buffer = turf.buffer(point, 500, { units: 'miles' })
    GeoJsonDataSource.load(buffer).then((DataSource) => {
      viewer.dataSources.add(DataSource)
      viewer.flyTo(DataSource)
    })
    console.log(point)

    return {
    }
  }
})
</script>
<style lang='scss' scoped>
</style>
